home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgLangD.iso / BORLAND TURBO / CHESS.PAK / INFO.H < prev    next >
Encoding:
C/C++ Source or Header  |  1997-05-06  |  2.3 KB  |  74 lines

  1. //----------------------------------------------------------------------------
  2. // ObjectWindows - (C) Copyright 1991, 1993 by Borland International
  3. //----------------------------------------------------------------------------
  4. #ifndef INFO_H
  5. #define INFO_H
  6.  
  7. #ifndef OWL_STATIC_H
  8. # include <owl/static.h>
  9. #endif
  10. class _OWLCLASS TDC;
  11.  
  12. class TNoEraseBkGndStatic : public TStatic {
  13.   public:
  14.     TNoEraseBkGndStatic(TWindow* parent, int id, const char* title, int x,
  15.                         int y, int w, int h, WORD textLen);
  16.  
  17.     BOOL EvEraseBkGnd(HDC);
  18.  
  19.     void SetErase() {DoErase = TRUE;}
  20.     void SetText(const char* text);
  21.  
  22.   private:
  23.     BOOL DoErase;
  24.     int LastLen;
  25.  
  26.   DECLARE_RESPONSE_TABLE(TNoEraseBkGndStatic);
  27. };
  28.  
  29. class TInfoWindow : public TWindow {
  30.   public:
  31.     TInfoWindow(TWindow* parent, const char* title);
  32.  
  33.     void SetTurnText(const char* text)      {Color->SetText(text);}
  34.     void SetWhiteInfoText(const char* text) {WhiteInfo->SetText(text);}
  35.     void SetBlackInfoText(const char* text) {BlackInfo->SetText(text);}
  36.     void SetTimerText(const char* text)     {Timer->SetText(text);}
  37.     void SetLevelText(const char* text)     {Level->SetText(text);}
  38.     void SetIterationText(const char* text) {Iteration->SetText(text);}
  39.     void SetValueText(const char* text)     {Value->SetText(text);}
  40.     void SetNodeText(const char* text)      {Nodes->SetText(text);}
  41.     void SetSecondsText(const char* text)   {Seconds->SetText(text);}
  42.     void SetDepthText(const char* text)     {Depth->SetText(text);}
  43.     void SetBestLineText(const char* text)  {BestLine->SetText(text);}
  44.     void SetMessageText(const char* text)   {Message->SetText(text);}
  45.  
  46.     void   EvPaint();
  47.     HBRUSH EvCtlColor(HDC hDC, HWND hWndChild, UINT ctlType);
  48.     void   Reset();
  49.     void   IterReset();
  50.  
  51.   private:
  52.     TStatic* Color;
  53.     TStatic* WhiteInfo;
  54.     TStatic* BlackInfo;
  55.     TNoEraseBkGndStatic* Timer;
  56.     TStatic* Level;
  57.     TStatic* Iteration;
  58.     TStatic* Value;
  59.     TStatic* Nodes;
  60.     TStatic* Seconds;
  61.     TNoEraseBkGndStatic* Depth;
  62.     TStatic* BestLine;
  63.     TStatic* Message;
  64.     TRect    InfoRect;
  65.  
  66.     void     DrawSFrame(TDC&, TRect&);
  67.     void     DrawStaticFrames(TDC&);
  68.     void     DrawInfoFrame(TDC& dc);
  69.  
  70.   DECLARE_RESPONSE_TABLE(TInfoWindow);
  71. };
  72.  
  73. #endif  // INFO_H
  74.